Skip to content

feat: marmot protocol#601

Closed
CKodidela wants to merge 5 commits intocameri:mainfrom
CKodidela:feat/marmot-protocol
Closed

feat: marmot protocol#601
CKodidela wants to merge 5 commits intocameri:mainfrom
CKodidela:feat/marmot-protocol

Conversation

@CKodidela
Copy link
Copy Markdown
Collaborator

Description

Adds relay support for the Marmot Protocol, the emerging standard for
E2EE group messaging on Nostr (MIPs 00–03).

The relay stays fully transport-only no MLS logic, all cryptographic complexity lives on the client side.

Kind Role Handling
443 Legacy KeyPackage DefaultEventStrategy (regular storage)
10051 KeyPackage relay list ReplaceableEventStrategy
30443 KeyPackage (addressable) ParameterizedReplaceableEventStrategy (d-tag deduplication)
444 Welcome rumor Blocked from direct publishing per MIP-02; delivered via existing kind:1059 gift wrap
infrastructure
445 Group Event New GroupEventStrategy validates required h tag (nostr_group_id) before storing

#h tag subscriptions for group filtering work via the existing generic single-character tag index no migration
needed. NIP-11 relay info now advertises supported_mips: [0, 1, 2, 3].

Related Issue

Closes #579

Motivation and Context

Nostream has no support for the Marmot Protocol. Adding relay support makes nostream one of the first relays to
explicitly support it, and pairs naturally with the NIP-17+44 work from #458.

How Has This Been Tested?

  • 26 new unit tests covering: GroupEventStrategy (valid event, missing h tag, multiple h tags, malformed group
    ID), factory routing for all 5 Marmot kinds, kind:444 direct-publish blocking, and
    isWelcomeRumorEvent/isMarmotGroupEvent helpers
  • Full suite: 1238 tests passing (was 1212)
  • pnpm run build clean
  • pnpm run lint clean (285 files, no issues)

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and I added an empty changeset.
  • All new and existing tests passed.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 3, 2026

🦋 Changeset detected

Latest commit: ef1e7f9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CKodidela CKodidela changed the title Feat/marmot protocol feat: marmot protocol May 3, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 64.503% (-0.09%) from 64.591% — CKodidela:feat/marmot-protocol into cameri:main

@CKodidela CKodidela closed this May 3, 2026
@CKodidela CKodidela deleted the feat/marmot-protocol branch May 3, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add Marmot Protocol relay support (kind 443/444/445)

2 participants